package com.Controller;

import com.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.stereotype.Controller;


@Controller
@RequestMapping("sendemail")
public class EmailController {

    @Autowired
    MailService mailService;

    @RequestMapping("send1")
    public String sendSimpleEmail(){

        String to="15077303298@163.com";
        String subject="发送成功";
        String text="邮件";
        mailService.sendSimpleEmail(to,subject,text);
        System.out.println("发送成功");
        return "redirect:/employee/lists";
    }
}
